<?php 
	$cs = Yii::app()->clientScript;
	$theme_path = yii::app()->theme->basePath;
	$theme_url = yii::app()->theme->baseUrl;
	
	//包含基本样式、脚本
	$cs->registerCoreScript('jquery');
	$cs->registerScriptFile($theme_url . '/js/site.js', CClientScript::POS_END);
	$cs->registerCssFile($theme_url . '/css/site.css');
	
	//尝试包含当前页面样式及脚本
	$action_resource = $this->id . '_' . $this->action->id;
	if(file_exists($theme_path . '/js/page/' . $action_resource . '.js')){
		$cs->registerScriptFile($theme_url . '/js/page/' . $action_resource . '.js', CClientScript::POS_END);
	}
	if(file_exists($theme_path . '/css/page/' . $action_resource . '.css')){
		$cs->registerCssFile($theme_url . '/css/page/' . $action_resource . '.css');
	}
?>
<!DOCTYPE html>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta name="language" content="zh-cn" />
		<meta name="keywords" content=""/>
		<meta name="description" content=""/>
		<title><?php echo CHtml::encode($this->pageTitle); ?></title>
	</head>
	<body>
		<?php 
			echo $content;
		?>
	</body>
</html>
